In accessing directories in a hierarchical file system, it is necessary to specify a complete path. Certain protocols return to the file system or other program a variable number of directory entries as defined by the entry structure. When these protocols are accessed via a subroutine, the number of bytes returned by the subroutine may exceed the size of the input argument to the subroutine, requiring multiple subroutine calls to obtain all of the entries. The problem with schemes such as this is that the directory may change between "Read From Directory" (RFD) operations, logically or physically invalidating the value assigned thereto. There being no known simple mechanism to correct this situation (other than prohibiting directory modifications, until the complete directory has been read), spurious or duplicate directory entries are often returned to the caller. Thus, the RFD operation becomes nondeterministic, with misleading directory listings and errors, resulting sometimes, even, in a failed program.
The present invention is a system that allows a computer program to read a directory using a deterministic method. The invention uses a unique, alternate internal naming (AIN) method to identify directory entries. This method is compatible with most file systems, such as the Unix.RTM. file system employing the inode mechanism. The inventive method uniquely allows AIN values to be reused. The method is not compromised, even when the AIN value is immediately reassigned to a different name in the same directory or the same name in a different directory.